﻿gift_interaction_1k = {
	category = interaction_category_friendly
	common_interaction = yes
	interface_priority = 56
	desc = gift_interaction_desc

	greeting = positive
	notification_text = SEND_GIFT_PROPOSAL

	answer_accept_key = SEND_GIFT_ACCEPT
	answer_reject_key = SEND_GIFT_REJECT

	is_shown = {
		NOT = {
			scope:recipient = scope:actor
		}

		# Prioritize paying back loans first
		scope:actor = {
			trigger_if = {
				limit = {
					exists = var:loan_amount_owed
					exists = var:loan_holder
				}
				NOT = { var:loan_holder = scope:recipient }
			}
		}
	}

	is_valid_showing_failures_only = {
		scope:actor.gold >= 1000
		scope:recipient = { is_diplomatically_available = yes }
	}

	on_auto_accept = {
		scope:recipient = {
			trigger_event = char_interaction.0100
		}
	}

	on_accept = {
		scope:actor = {
			send_interface_message = {
				type = event_generic_neutral
				title = gift_interaction_notification
				right_icon = scope:recipient
				pay_short_term_gold = {
					gold = 1000
					target = scope:recipient
				}
				stress_impact = {
					greedy = medium_stress_impact_gain
				}
				scope:recipient = {
					add_opinion = {
						target = scope:actor
						modifier = gift_opinion
						opinion = send_gift_opinion
					}
				}
			}

			# Warning for multiple gifts
			if = {
				limit = {
					scope:recipient = {
						has_opinion_modifier = {
							target = scope:actor
							modifier = gift_opinion
						}
					}
				}
				custom_tooltip = ALREADY_SENT_GIFT_WARNING
			}
		}
	}
	
	auto_accept = {
		custom_description = {
			text = auto_accept_interaction_ai	
			object = scope:recipient
			scope:recipient = {
				is_ai = yes
			}
		}
	}
	
	ai_min_reply_days = 1
	ai_max_reply_days = 1
	
	ai_will_do = {
		base = 0
	}
	
}

gift_interaction_3k = {
	category = interaction_category_friendly
	common_interaction = yes
	interface_priority = 57
	desc = gift_interaction_desc

	greeting = positive
	notification_text = SEND_GIFT_PROPOSAL

	answer_accept_key = SEND_GIFT_ACCEPT
	answer_reject_key = SEND_GIFT_REJECT

	is_shown = {
		NOT = {
			scope:recipient = scope:actor
		}

		# Prioritize paying back loans first
		scope:actor = {
			trigger_if = {
				limit = {
					exists = var:loan_amount_owed
					exists = var:loan_holder
				}
				NOT = { var:loan_holder = scope:recipient }
			}
		}
	}

	is_valid_showing_failures_only = {
		scope:actor.gold >= 3000
		scope:recipient = { is_diplomatically_available = yes }
	}

	on_auto_accept = {
		scope:recipient = {
			trigger_event = char_interaction.0100
		}
	}

	on_accept = {
		scope:actor = {
			send_interface_message = {
				type = event_generic_neutral
				title = gift_interaction_notification
				right_icon = scope:recipient
				pay_short_term_gold = {
					gold = 3000
					target = scope:recipient
				}
				stress_impact = {
					greedy = medium_stress_impact_gain
				}
				scope:recipient = {
					add_opinion = {
						target = scope:actor
						modifier = gift_opinion
						opinion = send_gift_opinion
					}
				}
			}

			# Warning for multiple gifts
			if = {
				limit = {
					scope:recipient = {
						has_opinion_modifier = {
							target = scope:actor
							modifier = gift_opinion
						}
					}
				}
				custom_tooltip = ALREADY_SENT_GIFT_WARNING
			}
		}
	}
	
	auto_accept = {
		custom_description = {
			text = auto_accept_interaction_ai	
			object = scope:recipient
			scope:recipient = {
				is_ai = yes
			}
		}
	}
	
	ai_min_reply_days = 1
	ai_max_reply_days = 1
	
	ai_will_do = {
		base = 0
	}
	
}

gift_interaction_5k = {
	category = interaction_category_friendly
	common_interaction = yes
	interface_priority = 58
	desc = gift_interaction_desc

	greeting = positive
	notification_text = SEND_GIFT_PROPOSAL

	answer_accept_key = SEND_GIFT_ACCEPT
	answer_reject_key = SEND_GIFT_REJECT

	is_shown = {
		NOT = {
			scope:recipient = scope:actor
		}

		# Prioritize paying back loans first
		scope:actor = {
			trigger_if = {
				limit = {
					exists = var:loan_amount_owed
					exists = var:loan_holder
				}
				NOT = { var:loan_holder = scope:recipient }
			}
		}
	}

	is_valid_showing_failures_only = {
		scope:actor.gold >= 5000
		scope:recipient = { is_diplomatically_available = yes }
	}

	on_auto_accept = {
		scope:recipient = {
			trigger_event = char_interaction.0100
		}
	}

	on_accept = {
		scope:actor = {
			send_interface_message = {
				type = event_generic_neutral
				title = gift_interaction_notification
				right_icon = scope:recipient
				pay_short_term_gold = {
					gold = 5000
					target = scope:recipient
				}
				stress_impact = {
					greedy = medium_stress_impact_gain
				}
				scope:recipient = {
					add_opinion = {
						target = scope:actor
						modifier = gift_opinion
						opinion = send_gift_opinion
					}
				}
			}

			# Warning for multiple gifts
			if = {
				limit = {
					scope:recipient = {
						has_opinion_modifier = {
							target = scope:actor
							modifier = gift_opinion
						}
					}
				}
				custom_tooltip = ALREADY_SENT_GIFT_WARNING
			}
		}
	}
	
	auto_accept = {
		custom_description = {
			text = auto_accept_interaction_ai	
			object = scope:recipient
			scope:recipient = {
				is_ai = yes
			}
		}
	}
	
	ai_min_reply_days = 1
	ai_max_reply_days = 1
	
	ai_will_do = {
		base = 0
	}
	
}

gift_interaction_10k = {
	category = interaction_category_friendly
	common_interaction = yes
	interface_priority = 59
	desc = gift_interaction_desc

	greeting = positive
	notification_text = SEND_GIFT_PROPOSAL

	answer_accept_key = SEND_GIFT_ACCEPT
	answer_reject_key = SEND_GIFT_REJECT

	is_shown = {
		NOT = {
			scope:recipient = scope:actor
		}

		# Prioritize paying back loans first
		scope:actor = {
			trigger_if = {
				limit = {
					exists = var:loan_amount_owed
					exists = var:loan_holder
				}
				NOT = { var:loan_holder = scope:recipient }
			}
		}
	}

	is_valid_showing_failures_only = {
		scope:actor.gold >= 10000
		scope:recipient = { is_diplomatically_available = yes }
	}

	on_auto_accept = {
		scope:recipient = {
			trigger_event = char_interaction.0100
		}
	}

	on_accept = {
		scope:actor = {
			send_interface_message = {
				type = event_generic_neutral
				title = gift_interaction_notification
				right_icon = scope:recipient
				pay_short_term_gold = {
					gold = 10000
					target = scope:recipient
				}
				stress_impact = {
					greedy = medium_stress_impact_gain
				}
				scope:recipient = {
					add_opinion = {
						target = scope:actor
						modifier = gift_opinion
						opinion = send_gift_opinion
					}
				}
			}

			# Warning for multiple gifts
			if = {
				limit = {
					scope:recipient = {
						has_opinion_modifier = {
							target = scope:actor
							modifier = gift_opinion
						}
					}
				}
				custom_tooltip = ALREADY_SENT_GIFT_WARNING
			}
		}
	}
	
	auto_accept = {
		custom_description = {
			text = auto_accept_interaction_ai	
			object = scope:recipient
			scope:recipient = {
				is_ai = yes
			}
		}
	}
	
	ai_min_reply_days = 1
	ai_max_reply_days = 1
	
	ai_will_do = {
		base = 0
	}
	
}